package com.xbongbong.pro.competitor.pojo.vo;

import com.xbongbong.paas.toolbox.wrap.BaseVO;
import com.xbongbong.saas.enums.CompetitorPanoramaEnum;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @author: yingjf
 * @date: 2022/8/22 15:58
 * @description:
 */
@Getter
@Setter
@ToString
public class CompetitorPanoramaDataVO  extends BaseVO {
    /**
     * 指标属性
     */
    private String attr;
    /**
     * 全景指标名称
     */
    private String name;
    /**
     * 指标单位
     */
    private String unit;
    /**
     * 穿透的详情页tab英文名，如果改值为null或空字符串，则不能穿透
     */
    private String detailKey;
    /**
     * 全景指标值
     */
    private String value;

    public CompetitorPanoramaDataVO(boolean canSee,CompetitorPanoramaEnum competitorPanoramaEnum,String saleOpportunityMenuName, String value) {
        this.attr = competitorPanoramaEnum.getAttr();
        this.name = competitorPanoramaEnum.getName(saleOpportunityMenuName);
        this.unit = competitorPanoramaEnum.getUnit();
        if(canSee){
            this.detailKey = competitorPanoramaEnum.getDetailKey();
        }
        this.value = value;
    }
}
